package com.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @Author milian
 * @Date 2021/8/19 0019 22:10
 */
public class title2 {
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.jdbc.Driver");
        String url="jdbc:mysql://localhost:3306/db10?useSSL=false";
        String username="root";
        String password="root";
        Connection conn = DriverManager.getConnection(url, username, password);
        String sql = "update account set money=1000";

        Statement stem = conn.createStatement();
        int i = stem.executeUpdate(sql);
        System.out.println(i);
        stem.close();
        conn.close();

    }
}
